package com.punai.evaluationSystem.costDataEvalute.bo;

import cn.hutool.core.collection.CollUtil;
import com.punai.common.core.domain.BaseEntity;
import com.punai.evaluationSystem.costDataEvalute.domain.EvaluationDataPrice;
import com.punai.externalccb.constants.CCBConstants;

import java.math.BigDecimal;
import java.util.List;

public class CostDataEvaluteBo extends BaseEntity {
    private String classification;
    private String cleanStatus = "清洗数据";//清洗状态
    private Long companyId;
    private String idStr;
    // 专业  房建 安装 市政 精装修   字典取值
    private String specialty;
    private String isIncludeStr;//特征值是否包含
    private String include;
    private String notInclude;
    private BigDecimal srprice;//收入价
    private BigDecimal cbprice;//成本价
    private BigDecimal lre;//利润额
    private BigDecimal lrl;//利润率

    private String prop;//排序字段
    private String order;//排序方式

    private List<EvaluationDataPrice> priceSaveData;
    private List<CostDataEvaluteBo> yypmSaveData;

    private String categoryId;
    private String versionId;
    private String gxCbType;/* 针对于分包价格库 - 是工序还是成本 */

    private String id;
    private String code;
    private String name;
    private String pid;
    private String type;//页签类型
    private String viewOrEdit;
    private String singleFeeId;//当前选中id
    private String engineeringMajor;//工程专业
    private String projectDept;//项目部门
    private String projectName;//项目名称
    private String address;//地区
    private List<String> addressList;//地区->省市区
    private String priceType;//价格来源
    private List<String> dateRange;//时间范围
    private String timeStart;//开始时间
    private String timeEnd;//结束时间
    private String evaluteType;//评价类型
    private String priceNum;//价格数量

    private String fyxCode;//费用项编码
    private String fyxName;//费用项名称
    private String fyxCodeSequence;//原始编码
    private String tzz;//特征值
    private String jldw;//计量单位
    private String gznr;//工作内容
    private String jsgz;//计算规则
    private int btjgsl;//不同价格数量
    private int count;//总数量
    private BigDecimal price;//单价
    private String dataJson;//源数据JSON
    private int yycs;//应用次数
    private String orginCode;
    private String oid;
    private String proid;
    private String jqAvg;//加权平均值
    private String priceSource;//价格来源名称

    private List<String> list;
    private List<String> ids;
    private List<String> oids;
    private List<String> codes;

    private Integer pageNum;
    private Integer pageSize;

    public static CostDataEvaluteBo convert(CostDataEvaluteBo bo){
        if (bo.getEngineeringMajor()!=null && bo.getEngineeringMajor().equals("全部")){
            bo.setEngineeringMajor(null);
        }
        if (bo.getProjectDept()!=null && bo.getProjectDept().equals("全部")){
            bo.setProjectDept(null);
        }
        if (bo.getAddress()!=null && bo.getAddress().equals("全部")){
            bo.setAddress(null);
        }
        if (bo.getPriceType()!=null && bo.getPriceType().equals("全部")){
            bo.setPriceType(null);
        }
        if (bo.getEvaluteType()!=null && bo.getEvaluteType().equals("全部")){
            bo.setEvaluteType(null);
        }
        if (CollUtil.isNotEmpty(bo.getAddressList())){
            StringBuilder str = new StringBuilder();
            for (String address : bo.getAddressList()) {
                str.append(address);
            }
            bo.setAddress(str.toString());
        }
        return bo;
    }


    public String getClassification() {
        return classification;
    }

    public void setClassification(String classification) {
        this.classification = classification;
    }

    public String getProp() {
        return prop;
    }

    public void setProp(String prop) {
        this.prop = prop;
    }

    public String getOrder() {
        return order;
    }

    public void setOrder(String order) {
        this.order = order;
    }

    public List<EvaluationDataPrice> getPriceSaveData() {
        return priceSaveData;
    }

    public void setPriceSaveData(List<EvaluationDataPrice> priceSaveData) {
        this.priceSaveData = priceSaveData;
    }

    public List<CostDataEvaluteBo> getYypmSaveData() {
        return yypmSaveData;
    }

    public void setYypmSaveData(List<CostDataEvaluteBo> yypmSaveData) {
        this.yypmSaveData = yypmSaveData;
    }

    public String getIdStr() {
        return idStr;
    }

    public void setIdStr(String idStr) {
        this.idStr = idStr;
    }

    public String getSingleFeeId() {
        return singleFeeId;
    }

    public void setSingleFeeId(String singleFeeId) {
        this.singleFeeId = singleFeeId;
    }

    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public String getEngineeringMajor() {
        return engineeringMajor;
    }

    public void setEngineeringMajor(String engineeringMajor) {
        this.engineeringMajor = engineeringMajor;
    }

    public String getProjectDept() {
        return projectDept;
    }

    public void setProjectDept(String projectDept) {
        this.projectDept = projectDept;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public List<String> getAddressList() {
        return addressList;
    }

    public void setAddressList(List<String> addressList) {
        this.addressList = addressList;
    }

    public String getPriceType() {
        return priceType;
    }

    public void setPriceType(String priceType) {
        this.priceType = priceType;
    }

    public List<String> getDateRange() {
        return dateRange;
    }

    public void setDateRange(List<String> dateRange) {
        this.dateRange = dateRange;
    }

    public String getEvaluteType() {
        return evaluteType;
    }

    public void setEvaluteType(String evaluteType) {
        this.evaluteType = evaluteType;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    public String getFyxCode() {
        return fyxCode;
    }

    public void setFyxCode(String fyxCode) {
        this.fyxCode = fyxCode;
    }

    public String getFyxName() {
        return fyxName;
    }

    public void setFyxName(String fyxName) {
        this.fyxName = fyxName;
    }

    public String getFyxCodeSequence() {
        return fyxCodeSequence;
    }

    public void setFyxCodeSequence(String fyxCodeSequence) {
        this.fyxCodeSequence = fyxCodeSequence;
    }

    public String getJldw() {
        return jldw;
    }

    public void setJldw(String jldw) {
        this.jldw = jldw;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public String getDataJson() {
        return dataJson;
    }

    public void setDataJson(String dataJson) {
        this.dataJson = dataJson;
    }

    public List<String> getList() {
        return list;
    }

    public void setList(List<String> list) {
        this.list = list;
    }

    public List<String> getIds() {
        return ids;
    }

    public void setIds(List<String> ids) {
        this.ids = ids;
    }

    public List<String> getOids() {
        return oids;
    }

    public void setOids(List<String> oids) {
        this.oids = oids;
    }

    public String getTzz() {
        return tzz;
    }

    public void setTzz(String tzz) {
        this.tzz = tzz;
    }

    public int getBtjgsl() {
        return btjgsl;
    }

    public void setBtjgsl(int btjgsl) {
        this.btjgsl = btjgsl;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getCleanStatus() {
        return cleanStatus;
    }

    public void setCleanStatus(String cleanStatus) {
        this.cleanStatus = cleanStatus;
    }

    public String getGznr() {
        return gznr;
    }

    public void setGznr(String gznr) {
        this.gznr = gznr;
    }

    public String getJsgz() {
        return jsgz;
    }

    public void setJsgz(String jsgz) {
        this.jsgz = jsgz;
    }

    public int getYycs() {
        return yycs;
    }

    public void setYycs(int yycs) {
        this.yycs = yycs;
    }

    public String getOrginCode() {
        return orginCode;
    }

    public void setOrginCode(String orginCode) {
        this.orginCode = orginCode;
    }

    public String getOid() {
        return oid;
    }

    public void setOid(String oid) {
        this.oid = oid;
    }

    public String getProid() {
        return proid;
    }

    public void setProid(String proid) {
        this.proid = proid;
    }

    public String getJqAvg() {
        return jqAvg;
    }

    public void setJqAvg(String jqAvg) {
        this.jqAvg = jqAvg;
    }

    public List<String> getCodes() {
        return codes;
    }

    public void setCodes(List<String> codes) {
        this.codes = codes;
    }

    public String getPriceNum() {
        return priceNum;
    }

    public void setPriceNum(String priceNum) {
        this.priceNum = priceNum;
    }

    public String getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(String categoryId) {
        this.categoryId = categoryId;
    }

    public String getVersionId() {
        return versionId;
    }

    public void setVersionId(String versionId) {
        this.versionId = versionId;
    }

    public String getGxCbType() {
        return gxCbType;
    }

    public void setGxCbType(String gxCbType) {
        this.gxCbType = gxCbType;
    }

    public String getSpecialty() {
        return specialty;
    }

    public void setSpecialty(String specialty) {
        this.specialty = specialty;
    }

    public String getTimeStart() {
        return timeStart;
    }

    public void setTimeStart(String timeStart) {
        this.timeStart = timeStart;
    }

    public String getTimeEnd() {
        return timeEnd;
    }

    public void setTimeEnd(String timeEnd) {
        this.timeEnd = timeEnd;
    }

    public Integer getPageNum() {
        return pageNum;
    }

    public void setPageNum(Integer pageNum) {
        this.pageNum = pageNum;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public String getPriceSource() {
        return CCBConstants.CCB_TYPE.getDescByCode(getPriceType());
    }

    public void setPriceSource(String priceSource) {
        this.priceSource = priceSource;
    }

    public String getViewOrEdit() {
        return viewOrEdit;
    }

    public void setViewOrEdit(String viewOrEdit) {
        this.viewOrEdit = viewOrEdit;
    }

    public String getIsIncludeStr() {
        return isIncludeStr;
    }

    public void setIsIncludeStr(String isIncludeStr) {
        this.isIncludeStr = isIncludeStr;
    }

    public BigDecimal getSrprice() {
        return srprice;
    }

    public void setSrprice(BigDecimal srprice) {
        this.srprice = srprice;
    }

    public BigDecimal getCbprice() {
        return cbprice;
    }

    public void setCbprice(BigDecimal cbprice) {
        this.cbprice = cbprice;
    }

    public BigDecimal getLre() {
        return lre;
    }

    public void setLre(BigDecimal lre) {
        this.lre = lre;
    }

    public BigDecimal getLrl() {
        return lrl;
    }

    public void setLrl(BigDecimal lrl) {
        this.lrl = lrl;
    }

    public String getInclude() {
        return include;
    }

    public void setInclude(String include) {
        this.include = include;
    }

    public String getNotInclude() {
        return notInclude;
    }

    public void setNotInclude(String notInclude) {
        this.notInclude = notInclude;
    }
}
